function code(){
	var sum = "";
	for (var i = 0; i < 6; i++) {
		var j = Math.floor(Math.random()*10)+"";
		sum += j;
	}
	document.getElementById("code").value = sum;
}

function back(){
	
	window.history.back();
	
}

$(function (){
	/**
	 * 完成注册
	 */
	$("#editbtn").click(function register() {

		var phone = document.getElementById("phone").value;

		var vCode = document.getElementById("vc").value;

		var password = document.getElementById("password").value;

		//获取单选框：两个
		var obj = document.getElementsByName("sex");

		var sex = null;

		for (var i = 0; i < obj.length; i++) {

			if (obj[i].checked) {
				sex = obj[i].value;
				break;
			}
		}


		// 获取多选框的值, 有多个值，我就放到一个数组里面
		var obj1 = document.getElementsByName("hobby");

		var hobbyArray = new Array();

		for (var i = 0; i < obj1.length; i++) {

			if (obj1[i].checked) {

				//添加元素到数组的尾部
				hobbyArray.push(obj1[i].value);
			}
		}

		var age = document.getElementById("age").value;

		//获取文件
		var head = document.getElementById("header");
		var v = head.value;


		var obj2 = document.getElementById("education");


		var mySelf = document.getElementById("mySelf").value;

		//提交 form表单
		// document.getElementById("regForm").submit();

		$("#regForm").submit();

	})





})




